import os
# os.makedirs("a/b/c/d")
# os.mkdir('hehe/haha/houhou') #不能递归多个创建，只能创建一层文件夹
#
# os.removedirs('a/b/c/d') #删除多级空目录
# os.rmdir('hehe/haha/houhou') #删除一级目录
#多建少删

# lst = os.listdir('a')
# for name in lst:
#     print(lst)
#
# def func(path,ceng):
#     lst = os.listdir(path)
#     for name in lst:
#         file_path = os.path.join(path,name)
#         if os.path.isdir(file_path):
#             print("\t--"*ceng,name)
#             func(file_path,ceng+1)
#         else:
#             print("\t--"*ceng,name)
# func("a",0) #a是文件夹名字

# file_path = os.path.join("a","hhaha")
# print(file_path,type(file_path))

# for root,dirs,fils in os.walk('a'):
#     for dir in dirs:
#         print(os.path.join(root,dir))
#     for fil in fils:
#         print(os.path.join(root,fil))
